Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Experimental legacy (non Australis) toolbar button build #1315

Closed
AlexVallat opened this issue Apr 24, 2015 · 26 comments
Closed

Experimental legacy (non Australis) toolbar button build #1315

AlexVallat opened this issue Apr 24, 2015 · 26 comments

Comments

@AlexVallat
Copy link
Contributor

I have noticed there are a lot of requests for compatibility with browser variants which do not support Australis, or CustomizableUI. After doing some research, I think it will be possible to produce a legacy toolbar button that would be compatible with these - I can't provide specific support for every variant, but in a generic way I might be able to have a button with broad compatibility.

So, users of:
Palemoon (#518 and many, many more)
Seamonkey (#514 and several others)
Pentadactyl (#549)
Vimperator (#720)
and basically anyone else who is using a Firefox variant with which the uBlock button does not work, please give my test build a try and report back. I can't promise I will definitely fix it if it doesn't work on a given configuration, but I would like to have an idea of what works and what does not, to know whether this is worth keeping or not. This is still very much experimental, so I'm keeping it in my own fork for the moment.

https://github.com/AlexVallat/uBlock/releases/tag/0.9.3.5-dev-av.1

The legacy button will automatically be used if CustomizableUI is not available in the browser at all, but if it is available and just not working properly (probably because you've hidden the navigation bar, and probably by using Pentadactyl or Vimperator) then you can force it to use the legacy button by setting the about:config preference extensions.ublock.forceLegacyToolbarButton to true and restarting the browser. I'm not sure if we need any more user friendly way of doing this, but my current opinion is that if a user is advanced enough to be breaking Australis by hiding the nav bar (or anything else) they can probably cope with setting a preference manually.

@ghost
Copy link

ghost commented Apr 24, 2015

Testing in Pale Moon 25.3.1. Mint 17.1.

Size of the icon as far as cosmetics. Dashboard not opening from popup title bar. Main power button appears to work, with limited actionable area. Haven't been able to get the element picker and request logger to open. Not able to toggle advanced options, but the panel opens great.

pale moon

@Quantum-cross
Copy link

Pale Moon 25.3.1 64bit here running Ubuntu 14.10.
I can open the panel, but none of the buttons in the panel seem to work for me. Full disclosure, I have a high DPI screen and I have layout.css.devPixelsPerPx set to 1.6 in about:config which might affect things.

EDIT: As soon as I posted this, I just found the tiny area that triggers the large power button, so that is kind of working as kintpuash says.
And one last note, when I mouse over the element picker button and the button to the right I can see my cursor flashing from the "hand" cursor to the normal "non-clickable element" arrow cursor when I stop moving my mouse on the buttons.

ublock

@ghost
Copy link

ghost commented Apr 25, 2015

I can confirm that the toolbar button is present on SeaMonkey 2.33.1 with the experimental build. The element picker button works, the power button works, the network request logger button works, clicking on the title of the popup to go to the settings works, and the dynamic filtering pane works well too.

This should probably be filed under a different issue, but I wasn't quite sure how to describe it.
uBlock needs to be reset to the default settings before it actually blocks anything.
(Reproducing error: http://a.pomf.se/pgiucu.webm)
(Reproducing error with browser console open: http://a.pomf.se/yozgig.webm)
I noticed that it only happens when uBlock has already been installed. I haven't noticed the issue if it's a clean install of uBlock. It also seems to fix itself if you go to about:addons, disable uBlock, and then re-enable it.

I also tested it in Pale Moon 25.3.1, and I had the same experience as @Robcross and @kintpuash, none of the buttons were clickable except for a tiny area around the power button.
Browser console complains that doc.shell is undefined at frameModule.js, line 298.
(Reproducing error with browser console open: http://a.pomf.se/jvcjpc.webm)

I have not tested Pentadactyl or Vimperator.

@AlexVallat
Copy link
Contributor Author

Thanks for the feedback, all. Some comments:

Regarding the size of the icon, I'm not sure what to do here. At the moment I'm using the 16x16 icon if the toolbar reports its icon size as small, and 32x32 otherwise. There doesn't seem to be any good way to determine that PaleMoon would actually quite like a slightly smaller size, probably 24x24. But only on Linux.

The more serious issue is that it seems PaleMoon on Linux has very buggy popup panel handling. I've tried the most basic case of just having a popup content with no javascript and a single static link with a "_blank" target to the dashboard and it still won't open it. Strangely, works just fine on Windows. So, although the button itself would seem to be a possibility, having the popup working on PaleMoon on Linux seems to be a non-starter (unless any PaleMoon dev can enlighten us further).

Given that, I'm open to suggestions on what could be done for PaleMoon on Linux, which doesn't involve using a toolbar popup. I could have a preference which would make it work similarly to Fennec, and open an actual new browser window with the popup content in it. Far from ideal, but would that be better than no support at all?

@hotdogman The other error you mentioned, is that something I've introduced with this experimental build, or did you notice it with the main build too? I'll look into it.

@MiKiL75
Copy link

MiKiL75 commented Apr 25, 2015

I can confirm too that this experimental version works in Windows Seamonkey 2.33.1. Toolbar Button shows up and all it's buttons work fine.

I also see same problem that uBlock doesn't work after two-three browser restarts and I have to reset uBlock settings to get it working and then "working/not working" restarting cycle is needed. When uBlock isn't working I see next errors in error console:

 ----------
Sat Apr 25 2015 13:36:11
Error: TypeError: getTabBrowser(...) is null
Source file: chrome://ublock/content/js/vapi-background.js
Line: 514
 ----------
Sat Apr 25 2015 13:36:11
Error: TypeError: vAPI.lastError is not a function
Source file: chrome://ublock/content/js/assets.js
Line: 130
 ----------
Sat Apr 25 2015 13:36:18
Error: TypeError: doc.docShell.getInterface is not a function
Source file: chrome://ublock/content/frameModule.js
Line: 298
 ----------
Sat Apr 25 2015 13:36:18
Error: TypeError: doc.docShell.getInterface is not a function
Source file: chrome://ublock/content/frameModule.js
Line: 298
 ----------
Sat Apr 25 2015 13:36:18
Error: TypeError: doc.docShell.getInterface is not a function
Source file: chrome://ublock/content/frameModule.js
Line: 298
 ----------

These two errors shows up first time in uBlock 0.9.2.0.
TypeError: getTabBrowser(...) is null
TypeError: vAPI.lastError is not a function

After looking thru old issues I found same kind of error behaviour at #1027.

@AlexVallat
Copy link
Contributor Author

Thanks for the additional info on the that issue, @MiKiL75. I think I've implemented a fix for that now.

Also, good news on the PaleMoon/Linux front. It turns out that PaleMoon only has a problem with panels where level = parent. We can live without that. I've also found some tweaks I can do to improve button layout cosmetically. There are probably still configurations where it doesn't look great, but hopefully fewer of them.

https://github.com/AlexVallat/uBlock/releases/tag/0.9.3.5-dev-av.2

@ghost
Copy link

ghost commented Apr 25, 2015

@AlexVallat

All the functions working here on Pale Moon under Linux with the new build.

@ghost
Copy link

ghost commented Apr 25, 2015

@hotdogman The other error you mentioned, is that something I've introduced with this experimental build, or did you notice it with the main build too? I'll look into it.

I'm pretty sure that was a pre-existing issue, but I never bothered to report it because SeaMonkey was never supported.

Can confirm, everything is working fine in Pale Moon for Linux now. Element picker, rule creation, network request logger, power button, and clicking the title bar to go to the preferences.
One very, very, very minor CSS issue though.
snapshot12

SeaMonkey support is good, settings no longer need to be reset for static filtering to work.
I did notice one issue though:
With SeaMonkey:

  1. Go to http://www.seamonkey-project.org/start/
  2. Click on the uBlock toolbar icon
  3. Click on the element picker
  4. It tries to do block the whole page, you need to hit ESC before you can individually click elements.
    I didn't see any warnings or errors in the browser console.
    Video: http://a.pomf.se/nxcgxa.webm (Escape was hit around 24 or 25 seconds in)

@MiKiL75
Copy link

MiKiL75 commented Apr 25, 2015

Test build 2 got rid of that restart browser cycle and I don't no longer see these two errors.

TypeError: getTabBrowser(...) is null
TypeError: vAPI.lastError is not a function

Only oddity is that now I have two working Block element-menuitems in my Context menu and sometimes there's only one, coulnd't find a way to reproduce this at the moment.

@ghost
Copy link

ghost commented Apr 25, 2015

Now that @MiKiL75 has pointed it out, I also see two Block Elements in the context menu.
shot0001

https://github.com/AlexVallat/uBlock/commit/ed6064912e0740a775a4fa9ab765565f1f8afde7 fixed the multiple Block Elements in the context menu for me.
shot0002

I noticed something though:

It tries to do block the whole page, you need to hit ESC before you can individually click elements.

This only happens on a fresh start.
If you open SeaMonkey, and try to block an element on the homepage, the above happens.
If you open SeaMonkey, go to a different website, and then go back, the element picker works normally.

@AlexVallat
Copy link
Contributor Author

The css issues are completely separate, and should be raised as a new issue (#1320). I don't want to bundle a fix for those in with this work, as it's not even Firefox-specific, let alone related to this work!

@hotdogman's element picker issue is, I think, a general issue which I've raised as #1319

The double context menu thing appears to be a race condition specific to SeaMonkey, but I think I've fixed it. I don't think there's any need for a new test build just for that, unless anyone particularly needs one - the extra menu item is harmless.

@ghost
Copy link

ghost commented Apr 25, 2015

@hotdogman's element picker issue is, I think, a general issue which I've raised as #1319
general

That's strange. I didn't notice it Pale Moon or Firefox when I set browser.startup.homepage to http://www.seamonkey-project.org/start/, I could only reproduce it in SeaMonkey.
Either way, I agree though, I've veered this off course, and these should be filed as separate issues.
I think the main thing you were trying to accomplish, getting the toolbar button & popup to work on non-australis/CustomizableUI, works fine.

@AlexVallat
Copy link
Contributor Author

It's a tricky one, because the path to that element picker issue is twisty and turny, but I think that the previous bugs with Pale Moon and SeaMonkey would interact with this one in a way to neutralise it - the getTabBrowser(...) is null error would cause one of the duplicate loads to fail, and therefore you wouldn't get the duplicate load bug. I'm not 100% on that one, but it's my best guess.

Should be reproducible on plain Firefox, though, as long as it's set to use a normal web page as a home page. If not, then it's an even trickier bug. Either way, needs it's own issue to track!

As far as the legacy button support goes, that's looking pretty good to me now. Thanks to everyone on this thread for all the help testing it. If no-one else reports any issues with it, I'll see about getting it merged into the main build.

@MiKiL75
Copy link

MiKiL75 commented Apr 25, 2015

I also tested by drop-in replacing the modified vapi-background.js and I also confirm no more double context menu item.

Only thing now what I see in error console is this "TypeError: doc.docShell.getInterface is not a function" that seems to trigger in some sites but it doesn't seem affect to toolbar button or blocking, therefore probably doesn't belong to this issue anyway.

I would like thank you taking some time to give this support for Seamonkey. :)

@w0lfrun
Copy link

w0lfrun commented Apr 27, 2015

Just want to state that I downloaded the Legacy Toolbar Button Test Build 1 for Palemoon re windows 7 and it's working like a charm. The icon now shows with requests blocked and requests blocked since install as well as the continuous counter and am now using Dynamic filtering (works well) The element blocker working ok as well. I think a lot of Palemoon browser users are going to be quite happy with this. Great job and many thanks.

@LimboSlam
Copy link

I'm a Pale Moon user on Windows 7 (2011 build) x64 SP1 and I and others as well are very pleased with this! Thanks. Though I have one problem, Ublock 0.9.3.5-dev-av.2 seems to be blocking my "Tweet" button on Twitter whenever I want to reply/post or send a PM. Now I'm a pretty average user so I don't know how to get that element specifically unblocked and if I'm using Ublocks controls the right way. Here's what I think may be the problem (if I'm using this data the right way): " - ||twitter.com/i/jot xhr https://twitter.com/i/jot" and this: " - ||google-analytics.com^ script https://www.google-analytics.com/analytics.js" and this: " - ||twitter.com/i/jot xhr https://twitter.com/i/jot" (don't mind the quotation marks). Other then that, it's doing excellent! Keep up the good work you guys!! :)

@WyohKnott
Copy link
Contributor

@LimboSlam See gorhill/uBlock#141 (comment)

Edit: to unblock you must start the line with a @@:
@@||google-analytics.com^

There's a tutorial here: https://adblockplus.org/en/filters

@LimboSlam
Copy link

@WyohKnott Ok I got it working, thanks. But I don't know how to "un-hide the DOM elements." Can you show me how?

@LimboSlam
Copy link

@WyohKnott Thanks for you help, I got it from here. 👍

@WyohKnott
Copy link
Contributor

For your Twitter problem, you don't need to do that, just purge the third-party lists and update them. You should get the update of Fanboy Social re-establishing the Twitter button.

Otherwise, you can add twitter.com#@#.tweet-btn in My Filters

gorhill advice was a general one in case of problem like this, "unhide the DOM element" means disabling "Parse and enforce cosmetic filters. " in the options ( chrome://ublock0/content/dashboard.html#3p-filters.html ).

@LimboSlam
Copy link

Oh ok. Well it's good to know two ways how to do this. Many thanks.

@gorhill
Copy link
Contributor

gorhill commented Apr 28, 2015

@WyohKnott

"unhide the DOM element" means disabling "Parse and enforce cosmetic filters"

No, I meant to toggle the cosmetic filtering switch in the popup.

@chrisaljoudi
Copy link
Contributor

@gorhill currently unavailable in uBlock.

Will actually fix this right now.

@rdscorreia74
Copy link

Thank you very much for this, chrisaljoudi. Pale Moon user here :)

@Domokun1
Copy link

Domokun1 commented Jun 2, 2015

So in which version was this fix implemented?

@AlexVallat
Copy link
Contributor Author

This is released in version 0.9.4.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests